From: Florian Müllner Date: Tue, 12 Jan 2021 17:33:43 +0000 (+0100) Subject: Revert "WeatherClient: Set enabled providers after setting a valid location" X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~628 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=42ce04b108f7a607bbd18cdbca8d59bc51092e78;p=gnome-shell.git Revert "WeatherClient: Set enabled providers after setting a valid location" libgweather changed to not do any implicit network traffic in property setters, so this is again safe to pass to the constructor. This reverts commit 73b7d9ace463fd29a0bd7f315f1d87068c033062. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3577 Part-of: --- diff --git a/js/misc/weather.js b/js/misc/weather.js index e518f2285..97880ea91 100644 --- a/js/misc/weather.js +++ b/js/misc/weather.js @@ -68,11 +68,10 @@ var WeatherClient = class { this._world = GWeather.Location.get_world(); - this._providers = GWeather.Provider.METAR | - GWeather.Provider.YR_NO | - GWeather.Provider.OWM; - - this._weatherInfo = new GWeather.Info({ enabled_providers: 0 }); + let providers = GWeather.Provider.METAR | + GWeather.Provider.YR_NO | + GWeather.Provider.OWM; + this._weatherInfo = new GWeather.Info({ enabled_providers: providers }); this._weatherInfo.connect_after('updated', () => { this._lastUpdate = GLib.DateTime.new_now_local(); this.emit('changed'); @@ -216,8 +215,6 @@ var WeatherClient = class { this._weatherInfo.set_location(location); this._locationValid = location != null; - this._weatherInfo.set_enabled_providers(location ? this._providers : 0); - if (location) this._loadInfo(); else